package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Set;


/**
 * The persistent class for the COMPROBANTE database table.
 * 
 */
@Entity
@Table(name="COMPROBANTE")
public class Comprobante implements Serializable {
	private static final long serialVersionUID = 1L;
	private long comprobanteId;
	private String estado;
	private BigDecimal monto;
	private Abono abono;
	private Set<TaMedidaCautelarPj> taMedidaCautelarPjs;

    public Comprobante() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="COMPROBANTE_ID", unique=true, nullable=false)
	public long getComprobanteId() {
		return this.comprobanteId;
	}

	public void setComprobanteId(long comprobanteId) {
		this.comprobanteId = comprobanteId;
	}


	@Column(length=1)
	public String getEstado() {
		return this.estado;
	}

	public void setEstado(String estado) {
		this.estado = estado;
	}


	@Column(nullable=false, precision=12, scale=2)
	public BigDecimal getMonto() {
		return this.monto;
	}

	public void setMonto(BigDecimal monto) {
		this.monto = monto;
	}


	//bi-directional many-to-one association to Abono
    @ManyToOne
	@JoinColumn(name="ABONO_ID", nullable=false)
	public Abono getAbono() {
		return this.abono;
	}

	public void setAbono(Abono abono) {
		this.abono = abono;
	}
	

	//bi-directional many-to-one association to TaMedidaCautelarPj
	@OneToMany(mappedBy="comprobante")
	public Set<TaMedidaCautelarPj> getTaMedidaCautelarPjs() {
		return this.taMedidaCautelarPjs;
	}

	public void setTaMedidaCautelarPjs(Set<TaMedidaCautelarPj> taMedidaCautelarPjs) {
		this.taMedidaCautelarPjs = taMedidaCautelarPjs;
	}
	
}